package com.artron.mediaartron.data.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Class description here
 *
 * @author doing
 * @version 1.0.0
 * @since 2017-11-13.
 */

public class WorksData implements Parcelable, IsLoadMore<WorksData.WorksListBean>{


    /**
     * worksList : [{"id":"5e28c201a34445f789269e56c9d35bce","passportId":"45384e41fed4448bae34fafbb3053d21","name":"猫","price":399,"quantity":1,"size":"740X530","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 15:59","finishTime":"2017-11-09 15:59:05.0","status":2,"skuCode":"A03S02","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/7528ece362904c999b600c4235531b18_200.jpg","sku":null},{"id":"f0f46348b8264c39ac2f0c13074c9c74","passportId":"45384e41fed4448bae34fafbb3053d21","name":"猫","price":399,"quantity":1,"size":"740X530","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 15:59","finishTime":"2017-11-09 15:59:02.0","status":2,"skuCode":"A03S02","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/a81b5e4cd53e4d81a91cc2606b7c50df_200.jpg","sku":null},{"id":"77eb8d46fc9d4b638139b288d520a582","passportId":"45384e41fed4448bae34fafbb3053d21","name":"猫","price":299,"quantity":1,"size":"500X500","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 15:58","finishTime":"2017-11-09 15:58:26.0","status":2,"skuCode":"A03S05","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/6066941604cf4c4aa93e768d45ee6d82_200.jpg","sku":null},{"id":"a6c07a14245d4a6182ca18afb3f52f60","passportId":"45384e41fed4448bae34fafbb3053d21","name":"猫","price":299,"quantity":1,"size":"500X500","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 15:58","finishTime":"2017-11-09 15:58:25.0","status":2,"skuCode":"A03S05","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/ea30a97b0474484f82752fd6f543c60f_200.jpg","sku":null},{"id":"3a5b06bb514246e0a041d0fd00557c8e","passportId":"45384e41fed4448bae34fafbb3053d21","name":"未命名","price":299,"quantity":1,"size":"500X500","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 14:41","finishTime":"2017-11-09 14:41:31.0","status":2,"skuCode":"A03S05","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/f68e27b0c679465fa769369dc034a168_200.jpg","sku":null},{"id":"99294f6d8f264c02958fcc3c8fb653bf","passportId":"45384e41fed4448bae34fafbb3053d21","name":"未命名","price":299,"quantity":1,"size":"500X500","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 14:40","finishTime":"2017-11-09 14:40:42.0","status":2,"skuCode":"A03S05","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/0b79cb0a1afc40acb7f6610cb5dc806c_200.jpg","sku":null},{"id":"4e46d23c658b48798973472f6e24610a","passportId":"45384e41fed4448bae34fafbb3053d21","name":"未命名","price":299,"quantity":1,"size":"500X500","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 14:36","finishTime":"2017-11-09 14:36:46.0","status":2,"skuCode":"A03S05","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/2473f47b27b0463e9b055e3b4735e5f3_200.jpg","sku":null},{"id":"df7d3ec6f41c41c9aedf08ac5b30ecf7","passportId":"45384e41fed4448bae34fafbb3053d21","name":"未命名","price":299,"quantity":1,"size":"500X500","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 14:36","finishTime":"2017-11-09 14:36:31.0","status":2,"skuCode":"A03S05","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/a45cf4ac34c540d2b8c23a759ec8eb6f_200.jpg","sku":null},{"id":"6fd9134c3e8043a398293c9bdaa6a28e","passportId":"45384e41fed4448bae34fafbb3053d21","name":"未命名","price":299,"quantity":1,"size":"500X500","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 14:36","finishTime":"2017-11-09 14:36:23.0","status":2,"skuCode":"A03S05","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/9b5b8726b0b6402ba5d7af2df170f957_200.jpg","sku":null},{"id":"d6e53638dc61452087a33cd492aec68f","passportId":"45384e41fed4448bae34fafbb3053d21","name":"未命名","price":299,"quantity":1,"size":"500X500","color":"","shape":"银平面铝框","typeCode":"kuanghua","createTime":"2017-11-09 14:35","finishTime":"2017-11-09 14:35:46.0","status":2,"skuCode":"A03S05","thumbnailId":null,"thumbnailPath":"http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/b6d3a69a673f4089892e935a639e202c_200.jpg","sku":null}]
     * isMore : true
     */

    private boolean isMore;
    /**
     * id : 5e28c201a34445f789269e56c9d35bce
     * passportId : 45384e41fed4448bae34fafbb3053d21
     * name : 猫
     * price : 399
     * quantity : 1
     * size : 740X530
     * color :
     * shape : 银平面铝框
     * typeCode : kuanghua
     * createTime : 2017-11-09 15:59
     * finishTime : 2017-11-09 15:59:05.0
     * status : 2
     * skuCode : A03S02
     * thumbnailId : null
     * thumbnailPath : http://test2.artup.com/edited/final/2017/11/9/45384e41fed4448bae34fafbb3053d21/7528ece362904c999b600c4235531b18_200.jpg
     * sku : null
     */

    private List<WorksListBean> worksList;

    public boolean isIsMore() {
        return isMore;
    }

    public void setIsMore(boolean isMore) {
        this.isMore = isMore;
    }

    public List<WorksListBean> getWorksList() {
        return worksList;
    }

    public void setWorksList(List<WorksListBean> worksList) {
        this.worksList = worksList;
    }

    @Override
    public boolean isMore() {
        return isMore;
    }

    @Override
    public List<WorksListBean> getList() {
        return worksList;
    }

    public static class WorksListBean implements Parcelable {
        private String id;
        private String passportId;
        private String name;
        private int price;
        private int quantity;
        private String size;
        private String color;
        private String shape;
        private String typeCode;
        private String createTime;
        private String finishTime;
        private int status;
        private String skuCode;
        private String thumbnailId;
        private String thumbnailPath;
        private String sku;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getPassportId() {
            return passportId;
        }

        public void setPassportId(String passportId) {
            this.passportId = passportId;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public int getQuantity() {
            return quantity;
        }

        public void setQuantity(int quantity) {
            this.quantity = quantity;
        }

        public String getSize() {
            return size;
        }

        public void setSize(String size) {
            this.size = size;
        }

        public String getColor() {
            return color;
        }

        public void setColor(String color) {
            this.color = color;
        }

        public String getShape() {
            return shape;
        }

        public void setShape(String shape) {
            this.shape = shape;
        }

        public String getTypeCode() {
            return typeCode;
        }

        public void setTypeCode(String typeCode) {
            this.typeCode = typeCode;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getFinishTime() {
            return finishTime;
        }

        public void setFinishTime(String finishTime) {
            this.finishTime = finishTime;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getSkuCode() {
            return skuCode;
        }

        public void setSkuCode(String skuCode) {
            this.skuCode = skuCode;
        }

        public String getThumbnailId() {
            return thumbnailId;
        }

        public void setThumbnailId(String thumbnailId) {
            this.thumbnailId = thumbnailId;
        }

        public String getThumbnailPath() {
            return thumbnailPath;
        }

        public void setThumbnailPath(String thumbnailPath) {
            this.thumbnailPath = thumbnailPath;
        }

        public String getSku() {
            return sku;
        }

        public void setSku(String sku) {
            this.sku = sku;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.passportId);
            dest.writeString(this.name);
            dest.writeInt(this.price);
            dest.writeInt(this.quantity);
            dest.writeString(this.size);
            dest.writeString(this.color);
            dest.writeString(this.shape);
            dest.writeString(this.typeCode);
            dest.writeString(this.createTime);
            dest.writeString(this.finishTime);
            dest.writeInt(this.status);
            dest.writeString(this.skuCode);
            dest.writeString(this.thumbnailId);
            dest.writeString(this.thumbnailPath);
            dest.writeString(this.sku);
        }

        public WorksListBean() {
        }

        protected WorksListBean(Parcel in) {
            this.id = in.readString();
            this.passportId = in.readString();
            this.name = in.readString();
            this.price = in.readInt();
            this.quantity = in.readInt();
            this.size = in.readString();
            this.color = in.readString();
            this.shape = in.readString();
            this.typeCode = in.readString();
            this.createTime = in.readString();
            this.finishTime = in.readString();
            this.status = in.readInt();
            this.skuCode = in.readString();
            this.thumbnailId = in.readString();
            this.thumbnailPath = in.readString();
            this.sku = in.readString();
        }

        public static final Parcelable.Creator<WorksListBean> CREATOR = new Parcelable.Creator<WorksListBean>() {
            @Override
            public WorksListBean createFromParcel(Parcel source) {
                return new WorksListBean(source);
            }

            @Override
            public WorksListBean[] newArray(int size) {
                return new WorksListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte(this.isMore ? (byte) 1 : (byte) 0);
        dest.writeTypedList(this.worksList);
    }

    public WorksData() {
    }

    protected WorksData(Parcel in) {
        this.isMore = in.readByte() != 0;
        this.worksList = in.createTypedArrayList(WorksListBean.CREATOR);
    }

    public static final Parcelable.Creator<WorksData> CREATOR = new Parcelable.Creator<WorksData>() {
        @Override
        public WorksData createFromParcel(Parcel source) {
            return new WorksData(source);
        }

        @Override
        public WorksData[] newArray(int size) {
            return new WorksData[size];
        }
    };
}
